package com.redBook.mapper;

import com.redBook.dto.NoteInfoDTO;
import com.redBook.entity.NoteInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NotesInfoMapper {


    List<NoteInfo> findNotesByPage(long startPage, long size);

    void saveNote(NoteInfoDTO noteInfoDTO);

    @Select("select * from notes_info where id = #{noteId}")
    NoteInfo findByNoteId(Long noteId);

    List<NoteInfo> findNotesByPageAndUser(long startPage, long size, Long userId);
}
